package com.xsoft.logic.service.implement.monitor;


import java.util.List;

import com.xsoft.framework.service.BaseService;
import com.xsoft.logic.model.monitor.MonitorServer;
import com.xsoft.logic.model.monitor.MonitorServerRef;
import com.xsoft.logic.model.monitor.MonitorServerShell;
import com.xsoft.logic.service.interfaces.monitor.MonitorServerService;

public class MonitorServerServiceImpl extends BaseService implements MonitorServerService {
	
	private String selectMonSysByType
				  ,selectMonServerByType
				  ,insertMonRef
				  ,deleteMonRefExceptSys
				  ,deleteMonServerRef,
				  insertMonitorServerShell,
				  updateMonitorServerShell,
				  deleteMonitorServerShell;
	
	public String getSelectMonSysByType() {
		return selectMonSysByType;
	}


	public void setSelectMonSysByType(String selectMonSysByType) {
		this.selectMonSysByType = selectMonSysByType;
	}


	public String getSelectMonServerByType() {
		return selectMonServerByType;
	}


	public void setSelectMonServerByType(String selectMonServerByType) {
		this.selectMonServerByType = selectMonServerByType;
	}


	public String getInsertMonRef() {
		return insertMonRef;
	}


	public void setInsertMonRef(String insertMonRef) {
		this.insertMonRef = insertMonRef;
	}


	public String getDeleteMonRefExceptSys() {
		return deleteMonRefExceptSys;
	}


	public void setDeleteMonRefExceptSys(String deleteMonRefExceptSys) {
		this.deleteMonRefExceptSys = deleteMonRefExceptSys;
	}


	public String getDeleteMonServerRef() {
		return deleteMonServerRef;
	}


	public void setDeleteMonServerRef(String deleteMonServerRef) {
		this.deleteMonServerRef = deleteMonServerRef;
	}


	@Override
	public String getTableName() {
		// TODO Auto-generated method stub
		return "MonitorServer"; //应该是找MonitorServer.xml文件，而不是对应的这张表
	}


	@Override
	public List<MonitorServerRef> selectMonSysByType() {
		return (List<MonitorServerRef>)dao.findForList(selectMonSysByType, null);
	}


	@Override
	public List<MonitorServer> selectMonServerByType(String type) {
		return (List<MonitorServer>)dao.findForList(selectMonServerByType, type);
	}

	
	@Override
	public void insertMonRef(MonitorServerRef monRef) {
		// TODO Auto-generated method stub
		dao.insert(insertMonRef, monRef);
	}


	@Override
	public void deleteMonRefExceptSys() {
		// TODO Auto-generated method stub
		dao.remove(deleteMonRefExceptSys, null);
	}


	@Override
	public void deleteMonServerRef(Long id) {
		// TODO Auto-generated method stub
		dao.remove(deleteMonServerRef, id);
	}


	@Override
	public void insertMonitorServerShell(MonitorServerShell shell) {
		// TODO Auto-generated method stub
		dao.insert(insertMonitorServerShell, shell);
	}


	public String getInsertMonitorServerShell() {
		return insertMonitorServerShell;
	}


	public void setInsertMonitorServerShell(String insertMonitorServerShell) {
		this.insertMonitorServerShell = insertMonitorServerShell;
	}


	@Override
	public void updateMonitorServerShell(MonitorServerShell shell) {
		// TODO Auto-generated method stub
		 dao.update(updateMonitorServerShell, shell);
	}


	public String getUpdateMonitorServerShell() {
		return updateMonitorServerShell;
	}


	public void setUpdateMonitorServerShell(String updateMonitorServerShell) {
		this.updateMonitorServerShell = updateMonitorServerShell;
	}


	@Override
	public void deleteMonitorServerShell(Long id) {
		dao.remove(deleteMonitorServerShell, id);
		
	}


	public String getDeleteMonitorServerShell() {
		return deleteMonitorServerShell;
	}


	public void setDeleteMonitorServerShell(String deleteMonitorServerShell) {
		this.deleteMonitorServerShell = deleteMonitorServerShell;
	}

}
